import { AnimationClip } from 'cc'
import State from '../Base/State'
import { StateMachine } from '../Base/StateMachine'
import { SubStateMachine } from '../Base/SubStateMachine'
import {
  DIRECTION_ENUM,
  DIRECTION_ORDER_ENUM,
  PARAMS_NAME_ENUM,
  SPIKE_COUNT_ENUM,
  SPIKES_COUNT_MAP_NUMBER_ENUM,
} from '../Enums'
import DirectionSubStateMachine from '../Base/DirectionSubStateMachine'
import SpikesSubStateMachine from './SpikesSubStateMachine'

const BASE_URL = 'texture/spikes/spikestwo'

export default class SpikeTwoSubStateMachine extends SpikesSubStateMachine {
  constructor(fsm: StateMachine) {
    super(fsm)
    // 初始化了 idle动画
    this.stateMachines.set(SPIKE_COUNT_ENUM.ZERO, new State(fsm, BASE_URL + '/zero'))
    this.stateMachines.set(SPIKE_COUNT_ENUM.ONE, new State(fsm, BASE_URL + '/one'))
    this.stateMachines.set(SPIKE_COUNT_ENUM.TWO, new State(fsm, BASE_URL + '/two'))
    this.stateMachines.set(SPIKE_COUNT_ENUM.THREE, new State(fsm, BASE_URL + '/three'))
  }
}
